package com.ysd.util;

import com.google.gson.Gson;

public class Result {
	public String code;
	public String msg;
	public Integer count;
	public Object data;

	public static String toClient(String code, Object msg, Object data) {
		Result r = new Result();
		r.code = code;
		r.msg = msg.toString();
		r.data = data;
		Gson g = new Gson();
		return g.toJson(r);
	}
	
	public static String toClient(String code,String msg,Integer count, Object data) {
		Result r = new Result();
		r.code = code;
		r.msg = msg.toString();
		r.data = data;
		r.count = count;
		Gson g = new Gson();
		return g.toJson(r);
	}
}